// import adaptive from './adaptive.js'

// const install = function (Vue) {
//     // 绑定v-adaptive指令
//     Vue.directive('adaptive', adaptive)
// }

// if (window.Vue) {
//     window['adaptive'] = adaptive
//     // eslint-disable-next-line no-undef
//     Vue.use(install)
// }

// adaptive.install = install

// export default adaptive

import adaptive from "./adaptive.js";
import permission from "./permission.js";
import vueClearIndex from "./vueClearIndex.js";
import clickoutside from "./clickoutsideObj.js";
// 自定义指令
const directives = {
  adaptive,
  permission,
  vueClearIndex,
  clickoutside
};

export default {
  install(Vue) {
    Object.keys(directives).forEach(key => {
      Vue.directive(key, directives[key]);
    });
  }
};
